<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="quizman.domain.Question"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Edit Quiz</title>
</head>
<body>
<% 
	String quizName = (String)request.getAttribute("quizName");
	Question quest = (Question)request.getAttribute("question");
%>
<p>Edit a question.</p>
<form action="EditQuizPageController">
<label for="questionName">Question Name: </label> 
<input type="text" value="<%=quest.getName()  %>" disabled="disabled"><br>
<input type="hidden" name="questionName" value="<%=quest.getName()  %>"><br>
<input type="hidden" name="edit" value="edit">
<input type="hidden" name="quizName" value=<%=request.getParameter("quizName") %>">
<label for="questionText">Question Text: </label><input type="text" name="questionText" value="<%=quest.getText() %>" ><br>
<%= quest.getEditFormHtml() %>
<input type="reset">
<input type="submit">
</form>
<p><a href="ViewQuizPageController?quizName=<%=quizName%>">View</a> this quiz.</p>
</body>
</html>